﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AO.Core;

namespace ZoneEngine.Functions
{
    class Function_openbank : FunctionPrototype
    {
        public new int FunctionNumber = 53092;
        
        public new string FunctionName = "openbank";
        
        public override int ReturnNumber()
        { 
            return FunctionNumber; 
        }
        
        public override bool Execute(Dynel Self, Dynel Caller, object Target, object[] Arguments)
        {
            lock (Self)
            {
                lock (Caller)
                {
                    lock (Target)
                    {
                        return FunctionExecute(Self, Caller, Target, Arguments);
                    }
                }
            }
        }
        
        public override string ReturnName()
        {
            return FunctionName;
        }

        public bool FunctionExecute(Dynel Self, Dynel Caller, object Target, object[] Arguments)
        {
            Packets.BankOpen.Send(((Character)Self).client);
            return true; 
        }
    }
}
